
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Cubic response functions: \Sec{CCCR}}\label{sec:cccr}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In the \Sec{CCCR  } section the input that is  specific for 
coupled cluster cubic response properties is read in.
This section includes:
\begin{itemize}
\item frequency-dependent fourth-order properties
      $$ \gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D) = -
           \langle\langle A;B,C,D\rangle\rangle_{\omega_B,\omega_C,\omega_D}
         \quad \mbox{with~} \omega_A = -\omega_B -\omega_C -\omega_D
      $$
      where $A$, $B$, $C$ and $D$ can be any of the one-electron
      operators for which integrals are available in the 
      \Sec{*INTEGRALS} input part.
\item dispersion coefficients $D_{ABCD}(l,m,n)$ for 
      $ \gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D) $
      which for $n \ge 0$ are defined by the expansion 
      $$ \gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D) = 
          \sum_{l,m,n=0}^{\infty} \omega_B^l \, \omega_C^m \, \omega_D^n
            D_{ABCD}(l,m,n) $$
\end{itemize}
Coupled cluster cubic response functions and dispersion coefficients
are implemented for the models CCS, CC2 and CCSD.
Publications that report results obtained with CC cubic response
calculations should cite Ref.\ \cite{Haettig:CCCR}.
For dispersion coefficients also a citation of Ref.\
\cite{Haettig:DISPGAMMA} should be included.

The response functions are evaluated for a number of operator quadruples
(specified with the keywords \Key{OPERAT}, \Key{DIPOLE}, or \Key{AVERAG})
which are combined with triples of frequency arguments specified
using the keywords \Key{MIXFRE}, \Key{THGFRE}, \Key{ESHGFR}, \Key{DFWMFR},
\Key{DCKERR}, or \Key{STATIC}. The different frequency keywords are 
compatible and might be arbitrarely combined or repeated.
For dispersion coefficients use the keyword \Key{DISPCF}.

\begin{description}
\item[\Key{OPERAT}] \verb| |\newline
\verb|READ (LUCMD,'(4A)') LABELA, LABELB, LABELC, LABELD|\newline
\verb|DO WHILE (LABELA(1:1).NE.'.' .AND. LABELA(1:1).NE.'*')|\newline
\verb|  READ (LUCMD,'(4A)') LABELA, LABELB, LABELC, LABELD|\newline
\verb|END DO|

Read quadruples of operator labels.
For each of these operator quadruples the cubic response
function will be evaluated at all frequency triples.
Operator quadruples which do not correspond to symmetry allowed
combination will be ignored during the calculation. 

\item[\Key{DIPOLE}] 
Evaluate all symmetry allowed elements of the second dipole
hyperpolarizability (max. 81 components per frequency).

\item[\Key{PRINT }] \verb| |\newline
\verb|READ (LUCMD,*) IPRINT|

Set print parameter for the cubic reponse section.

\item[\Key{STATIC}] 
Add $\omega_A = \omega_B = \omega_C = \omega_D = 0$ to the frequency list.

\item[\Key{MIXFRE}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|\newline
\verb|READ (LUCMD,*) (CCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|\newline
\verb|READ (LUCMD,*) (DCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for general frequency mixing
$\gamma_{ABCD}(\omega_A;\omega_B,\omega_C,\omega_D)$: on the first line
following \Key{MIXFRE} the number of differenct frequencies
is read and from the next three lines the frequency arguments 
$\omega_B$, $\omega_C$, and $\omega_D$ are read
($\omega_A$ is set to $-\omega_B-\omega_C$).
                                                           
\item[\Key{THGFRE}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for third harmonic generation 
$\gamma_{ABCD}(-3\omega;\omega,\omega,\omega)$:
on the first line following \Key{THGFRE} the number of different
frequencies is read, from the second line the input for
$\omega_B = \omega$ is read. $\omega_C$ and $\omega_D$ are set to 
$\omega$ and $\omega_A$ to $-3\omega$. 
 
\item[\Key{ESHGFR}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for electric field induced second harmonic generation 
$\gamma_{ABCD}(-2\omega;\omega,\omega,0)$:
on the first line following \Key{ESHGFR} the number of different
frequencies are read, from the second line the input for
$\omega_B = \omega$ is read. $\omega_C$ is set to $\omega$,
$\omega_D$ to $0$ and $\omega_A$ to $-2\omega$. 
 
\item[\Key{DFWMFR}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (BCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for degenerate four wave mixing 
$\gamma_{ABCD}(-\omega;\omega,\omega,-\omega)$:
on the first line following \Key{DFWMFR} the number of different
frequencies are read, from the second line the input for
$\omega_B = \omega$ is read. $\omega_C$ is set to $\omega$,
$\omega_D$ and $\omega_A$ to $-\omega$. 
 
\item[\Key{DCKERR}] \verb| |\newline
\verb|READ (LUCMD,*) MFREQ|\newline
\verb|READ (LUCMD,*) (DCRFR(IDX),IDX=NCRFREQ+1,NCRFREQ+MFREQ)|

Input for dc-Kerr effect $\gamma_{ABCD}(-\omega;0,0,\omega)$:
on the first line following \Key{DCKERR} the number of different
frequencies are read, from the second line the input for
$\omega_D = \omega$ is read. $\omega_C$ and $\omega_D$ to $0$
and $\omega_A$ to $-\omega$. 
 
\item[\Key{USECHI}]
test option: use second-order $\chi$-vectors as intermediates
 
\item[\Key{USEXKS}] 
test option: use third-order $\xi$-vectors as intermediates
 
%\item[\Key{EXPCOF}]  % for expert use only !
%
\item[\Key{AVERAG}] \verb| |\newline
\verb|READ (LUCMD,'(A)') AVERAGE|\newline
\verb|READ (LUCMD,'(A)') SYMMETRY|

Evaluate special tensor averages of cubic response functions.
Presently implemented are the isotropic averages of the second
dipole hyperpolarizability
$\gamma_{||}$ and $\gamma_{\bot}$.
Set \verb+AVERAGE+ to \verb+GAMMA_PAR+ 
to obtain $\gamma_{||}$ and to
\verb+GAMMA_ISO+ to obtain $\gamma_{||}$ and $\gamma_{\bot}$.
The \verb+SYMMETRY+ input defines the selection rules 
exploited to reduce the number of tensor elements that have to be
evaluated. Available options are
\verb+ATOM+, \verb+SPHTOP+ (spherical top), \verb+LINEAR+,
and \verb+GENER+ (use point group symmetry from geometry input).
Note that the \Key{AVERAG} option should be specified in the \Sec{CCCR}
section before any \Key{OPERAT} or \Key{DIPOLE} input.
 
\item[\Key{DISPCF}] \verb| |\newline
\verb|READ (LUCMD,*) NCRDSPE| 

Calculate the dispersion coefficients $D_{ABCD}(l,m,n)$ up  to
$l+m+n = $ \verb+NCRDSPE+.
Note that dispersion coefficients presently are only available for
real fourth-order properties.
 
% \item[\Key{ODDISP}]  % not yet implemented...
 
\item[\Key{NO2NP1}] test option: switch off $2n+1$-rule for second-order
                    Cauchy vector equations.
 
\item[\Key{L2 BCD}] solve response equations for the second-order
Lagrangian multipliers $\bar{t}^{BC}$, $\bar{t}^{BD}$, $\bar{t}^{CD}$
instead of the equations for the second-order amplitudes
$t^{AD}$, $t^{AC}$, $t^{AB}$.
 
\item[\Key{L2 BC }] solve response equations for the second-order
Lagrangian multipliers $\bar{t}^{BC}$ instead of the equations for 
the second-order amplitudes $t^{AD}$.
 
\end{description}
